package com.iplatform.file.config;


import com.baomidou.lock.LockFailureStrategy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 自定义锁获取失败策略
 * @author wdl
 */
@Component
@Slf4j
public class MyLockFailureStrategy implements LockFailureStrategy {

    @Override
    public void onLockFailure(String key, long acquireTimeout, int acquireCount) {
        log.warn("thread:{} acquire lock fail,key:{} acquireTimeout:{}ms", Thread.currentThread().getName(), key,
                acquireTimeout);
    }
}
